<link href="admin.css" rel="stylesheet" type="text/css" />
<script src="<{$config.weburl}>/script/jquery-1.4.4.min.js" type="text/javascript" charset="utf-8" ></script>
<script type="text/javascript">
	$(function(){
		/* 全选 */
		 $('.checkall').click(function(){
			var _self = this;
			$('.checkitem').each(function(){
				if (!this.disabled)
				{
					$(this).attr('checked', _self.checked);
				}
			});
			$('.checkall').attr('checked', this.checked);
		});	 
	});
</script>
<div class="container dialog">
<form target="main" action="module.php?m=activity&s=activity_product.php" method="post">
<table class="table alc" id="related_table">
    <tbody>
        <tr class="header">
            <th width="20"></th>
            <th class="al">产品名称</th>
            <th width="100">产品编号</th>
            <th width="70">销售价</th>
            <th width="70">市场价</th>
            <th width="70">成本价</th>
            <th width="70">库存</th>
        </tr>
        <{foreach item=list key=num from=$de.list}>
        <tr>
            <td><input type="checkbox" value="<{$list.id}>" class="checkitem" name="chk[]"></td>
            <td class="name al">
            <input type="hidden" value="<{$list.id}>" name="related_id[]">
            <{$list.pname}>
            </td>
            <td><{$list.code}></td>
            <td><{$list.price}></td>
            <td><{$list.market_price}></td>
            <td><{$list.cost_price}></td>
            <td><{$list.amount}></td>
        </tr>
        <{foreachelse}>
        <tr>
            <td class="norecord" colspan="99"><i></i><span>暂无符合条件的数据记录</span></td>
        </tr>
        <{/foreach}>
    </tbody>
    <tfoot>
        <tr>
            <td colspan="2" class="al">
                <div class="del">
                <input type="checkbox" class="checkall" id="del">
                <label for="del">&nbsp;&nbsp;全选</label>
                </div>
				<input type="hidden" name="id" value="<{$smarty.get.id}>" />
                <input type="hidden" name="act" value="add" />
                <input type="submit" name="activity_button" value="添加" />
            </td>
            <td colspan="99"><div class="page"><{$de.page}></div></td>
        </tr>
    </tfoot>
</table>
</form>
</div>
